// Created by Windward Studios - no copyright is claimed. This code can be used in
// any manner by anyone for any reason. There is no copyright of any kind on it. You may
// use it in commercial products. You may change it without sharing those changes.
// We ask that you keep the "created by Windward Studios" in a comment at the top.

using System.Collections.Specialized;
using System.Configuration;
using System.Web;
using System.Web.Configuration;

namespace Kailua.net.windward.utils
{
	/// <summary>
	/// A means of querying configuration information that works on both a windows application and
	/// and ASP.NET web app.
	/// </summary>
	public class ConfigManager
	{
		/// <summary>
		/// The app.exe.config or web.config AppSettings properties.
		/// </summary>
		public static NameValueCollection AppSettings
		{
			get
			{
				if (HttpContext.Current == null)
					return ConfigurationManager.AppSettings;
				return WebConfigurationManager.AppSettings;
			}
		}
	}
}